//
//  iOSGLESView.h
//  GSEngine
//
//  Created by Александр on 25.01.14.
//  Copyright (c) 2014 SNK. All rights reserved.
//

#import "Precompiled.h"
#import <QuartzCore/QuartzCore.h>
#import <OpenGLES/ES3/gl.h>
#import <OpenGLES/ES3/glext.h>
#import <OpenGLES/EAGLDrawable.h>
#import <OpenGLES/EAGL.h>

@class EAGLContext;

@interface iOSGLESView : UIView
{
    EAGLContext* m_context;
    NSTimer* m_animTimer;
    NSTimeInterval m_animInterval;
    
    GLuint m_frameBuffer;
    GLuint m_renderBuffer;
    GLuint m_depthBuffer;
    BOOL m_useDepthBuffer;
}
-(id)initWithFrame:(CGRect)frame;
-(void)startAnimation;
-(void)render;
-(void)renderLoopEvent:(NSTimer*)sender;

-(void)createBuffers;
-(void)deleteBuffers;
-(void)useDepthBuffer;
-(void)discardDepthBuffer;

@end
